package com.ruoyi.commodity.mapper;

import com.ruoyi.commodity.domain.CommodityCategory;
import com.ruoyi.system.api.domain.SysDept;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface CommodityCategoryMapper {
    int updateCategoryChildren(List<CommodityCategory> commodityCategories);

    int selectNormalChildrenCategoryById(Long categoryId);

    int insertCommodityCategory(CommodityCategory commodityCategory);

    CommodityCategory selectCommodityCategoryById(Long categoryId);

    List<CommodityCategory> selectCommodityCategoryList(CommodityCategory commodityCategory);

    CommodityCategory checkCategoryNameUnique(@Param("categoryName") String categoryName, @Param("categoryId") Long categoryId);

    void updateCategoryStatusNormal(Long[] categoryIds);

    List<CommodityCategory> selectChildrenCategoryById(Long categoryId);

    int updateCommodityCategory(CommodityCategory commodityCategory);

    int hasChildByCategoryId(Long categoryId);

    int checkCategoryExistCommodity(Long categoryId);

    int deleteCategoryById(Long categoryId);

    List<CommodityCategory> selectCommodityCategoryList1(CommodityCategory commodityCategory);
}
